package com.mango.ch11;

import org.apache.hadoop.mapreduce.Partitioner;

public class MyPartitioner extends Partitioner<CompositeKey, Nvalue> {

    @Override
    public int getPartition(CompositeKey compositeKey, Nvalue nvalue, int i) {
        return Math.abs(compositeKey.getName().hashCode() % i);
    }
}
